resolving m2 errors