added secure check for form