Removed sorted() call, I was trying something else there. A min() call will be enough for now