Added docs and test