adding form functionality and fields