A quadrilateral $$ABCD$$ is inscribed in a circle with $$AD$$ as diameter. If $$AD=4$$ and $$AB=BC=1,$$ find the length of $$CD.$$