resolving type errors