implemented unit tests for all methods