provide a sound solution to as_left_id, as_right_id