before submit