change function to define