fix func definition