fix bug, aiur now works perfectly
add state field