removed an error of undefined variable