border conditions, pretty printing