change to dictionarys for return arrays