some date handling and some little bootstrapping