adding sorting
bar merge