updated tree search to return lower neighbor rather than lower or higher