form clearing optimized