add tests for lib