fixed history method of looping through keys