adjust form logic