ex16 + some extra credit in 15