fixed the regex, added comments for comprehension