Implented history and up and down arrows