adding most stuffs
simplifying some helpers
compiles
works perfectly on the sample code