add exists function in dmlinear