add solution for ex 7