new internal design
add match_ function
add getPosition function