Modified to handle out of area points