moved the signal testing code