added dynamic form expansion