Calculate subclass_lookup programatically