making use of userdatas toarray() method