finished final_4.c