added constructor from flats, optimized the other