fixed comparison logic, updated regex lib