Rewrite for new base.py