Move helper function for rest op task