updated to prevent unauthorized access