updated form functionality