adding check for already defined ct and cr in plot