use with_state