access :sort from params only once