implemented access restrictions and validity checks