Final verions of DiffTab function