added history and better setup