Get rid of the block of code from 414-418, the writingMode variable, and use a tertiary operation here too, like you do in lines 423, 424, etc.