Tweaked Is_Valid function it should work now someone else test it