orientation chat window algorithms