refactor rectangle strokes