changed code foramatter
splitted history into history and favourites