use uid instead of entity