addition of singletons sorting