fix flats, remove print statements