updated formatting and added docs