changed if statement for printing boxes