Writes functions to be written later