Changed function pointer to normal function