Finished problem A