working on tests and edge cases