good algorithm for door opening