chang3ed to recursive resolve method