add flow control

Change-Id: I5a32c295e3772ab9c90131849ea0db9b219a398c