these replacements seem to be wrong the if / else logic is obsolete now