Added basic state_machine to adverts