added directions to sorting view tables