You could use resolve function here, no?