submit homework

implemented additional feature; refactored the code for OOP; added more
unit tests