moved drawing to pattern