minor bug (not important for today) / try-catch clause added