refactored code isomer-builder-new.js