added history record management, added changes to API suggested by Lucy