added form and logic