function check route and mains forms