added hasPermission