problem definind a function