exception handling was added