* cleaned and improved code
* solved some issues