added function to access objects by name