added test program for test flipping relays