added error handling to no range