change state type to integer