ex10 solution with mild terribleness