Adapted to basic cmd.