add promise to getIP method