update program to keep conversation hierarchy