added Flat class