Some additions to isSignalGood function