mc
add greengen to dirs, and out-source it