updated to avoid duplicate routine "formtest"