Finished CodeWriting Functions