modified subsitute_variables so that it works with any input string
modified subsitute_variables so that it works with any input string

logic-refinery/datatable,logic-refinery/datatable,logic-refinery/datatable