a bit of restructuring code of viewaccessabledata