simplified branching in form submit