add try-except