better way of getting ref for pushes