fixed missing variable to point to addAsObject