tmp
add encounter, fix several bugs