finished resolve function