merge sort working for almost all data types