updated example and documented more