fix #7. Added checkAccess method