finished program A10