refactoring
adding more tests