changed re pattern in program 1