bidirectional scan