removed console.logs fixed regex