updated for offline....slightly