#112 add unit tests