if (duration >= 0) { m.duration = duration; } else { m.duration = m.duration; }