finished up problem6