Implemented tcdf and supporting functions