fixed issue 9 according to advice