Implementing history dialog