refactored form initializer