implemented toArray method for userData