Added number of cycles code