Reduced the size of the create history method