added limiting option to add_dat