Commented out parts of Daniel's code that throw range errors