solution of 8-2

fixed #2