[WIP] fixed docs and added tests