fixed branch on program 3