added flats, began pattern class