Added corpus function, the file is runnable and working. See file for specification.