fixed more bugs and added new unit tests
added new unit tests
added new unit tests