modified to make fields inaccessible