solution to prolem1