modify solution 21