used recursive function and stored the user object as node property
cleaned up comments