pimped up the try:except block