better S/N detection