added finally section and removed except