added function of printing rings