init for command and adapter