add a shorter version of solution 6