refactor push implementation