corrected function spec