corrected function prototype