sort options ans expend functions