add promise implementation