histroy funstions added