updated routes to accept triggers when changing state