work for objects with names