chaned IP address and added delay function