add resolve function