Solve problem 4

Also switch from using is to ==