Add stringAndCode function