based on https://github.com/seanlandsman/guavagenerators