moving callback function to settings