fixing syntax for a function def