remove unnecessary try-except block