added optional step of selecting only horizontal (or vertical) targets for analysis