added catches excptions