added solution for 6