start of solution for #3