fixed up code up to util
added documentation to the public API