added snapshot() function for visualizing object relationships