implemented access control restrictions for state vars