* simplified inRange function from an if-else block to just a return statement