form logic added