Added more constrains for choosing direction, rank=122