Getting rid of special case in drawLine