added first unit test
completed tests for all methods
refactored edge cases and added code to raise exceptions
refactored edge cases and added code to raise exceptions, also removed test code