fixed tests, added comments