updated to work better for printing