Added skelton sorting code