added security validation