modified to use the access functions