fixing ex. 6