First skeleton, not working well a lot of hacks to do.
added comment for future implementarion