allow to init with an object