refact with reinit