Amazingly, I got the implementation almost perfect.