updated for resolving exceptions