fixed the ring issue, the program is working