refactroing form