fix function as prototype