separated $resolve into it's own file.