updates docs and added tests