rewrite to the Variable and Datasource class