Added function setCDetails - less messy functions