fixed ex17
example for ex16