added invert and position specifying options