simplified entities.remove code