added merged sort