rewritten datatable
fixed memory leaks