Added direction to ordering