add sorting city trip algorithm