added functionalitis to history fragment