added docs and test