added backreferencing to regexs