much short version of solution 18