finish the push function