refine code, add simple resolver module