Added reinit function