program 4 for csc567