added fsm_watch, and database stuff