improved the object handling