initial working version
unit tests