fixing mistakes; got rid of datetree struct