finished demand-9: refactory with Guava