added example exceptioin handling