fixing up func definition