and body of `ret == ok` deserve move to own private method.