fully implemented all tests