init the file and add necessary functions