add doc blocks
add bit more unit tests