split handle_name into many smaller methods