moved some draw code to engine files