changes on tile_date function