Got flatten working