switch form implementation to variant type (work in progress)