revised open space detection