replaced str with cmd