fixed define func