add form functionality