changes to drawing the box a bit cleaner