Updated program 5