Port of base_bank based on PCaetan work