shitty agent started
add state to function definition