fixing invalid function name error