added docs and deleted comments