added functions to return array of data