adding additional tests / refactoring