worked on feature/issue #9 and did some other small changes to the code