short if instead of ternary in draw_rectangle