added some test
bugs in tests
reestruturing some comments