reworked form to load dynamically