adding sort by usage feature with revised changes