combined normalize & main