add form checking func