tie function built