code for the 4th ex