move some code to separate module
add tests