refactor ref status logic for pushing