Made Program B more efficient, using less code to get closer to target program end