Move draw text test into own procedure.