pasted in sort prototype