Updated history to handle arrays