added form functionality