code still ugly, but now we get the earliest month