improved history feature and better output styling