refactor out refresh wave state