small refactor in mirb