move the position of let and another error was shown