change function to registration