added error handleing