solutions to first three kernel routines of exercise 5, page 35