fix tests
refactor and add places
update docs