refactor reading of module version