adding form functionality