solution for 6