read returns object instead of array