return err and remove persist