rename before function