updated regexp in check()