safer loading of objects