update structure and added clear history