Create re_function