implemented throw and try/catch