added debug and commands