final clean up
code refactoring
bug fix
final cleaning + bug fix