optimized the form apply