Changed variable name. Add error handling code.