change state machine
leave more log
puts agent setting in initialize function