fixed method name and cleaned up the checkAccess method