position contorl logic