wrapped up, debugged, pretty print