Solution for 1.c