Add helper for reverse function