removed uneeded code, fix sort, added link