Handle different command type