handling edceptions better now