got problem with getting the function part working