cleaning up the code and making it take multiple Zs.