Changed syntax around returnHistory functions