flow service implementation