Restructured in to Exception based implementation