fix input and regexs