addapted for commands.