init docs
refactor
refactor
add tests