added initial code for _.resolve