added possibility to use an array as data source