add unit tests
merge changes from github