bug on 'ds.varexist' corrected and function renamed