clean up order in Flow.scala