added states and commands to defs