added check against command type