fix merge
add unit testing
update docs