editing get_base
editing docstring and prev is merged