merge, quick and heap sorts implemented