rebacked shellSort, added phpdoc to function