change is_direct_successor method to is_successor to represent the actual logic