function prototype error fix