Added some error handling
Updated tasts for range