Original for reference
Updated access check and removed old access denied functions