improved variable verification