added toArray to user model