stand alone pre-test scheme. developed in purely php