improved ugly print functions