fixed bugs in frequency sweep function; now returns to f[0] directly after sweep and makes inter-sweep pause