Some modifications in roundTime and collect functions and fixing bug related to the regex in main.js