func definition problem fixed