program 2 final version