started adding code for program 3. should we account for a branch?