Added function to retrieve all state changes between specified time