adds the throws to methods that throw exception