updated regexs and added a few definitions