merage thread and session