set up database & days left