maybe fix the badAccess