Hopefully i did that right...

If you can hang through the boring stuff theres a nasty surprize at the end