udpate cycle