changed repository 'getAll' function, returning now an array (needed to have 'length' property)