created an separate class for sort