seperate the vayant code and create tester