added optional normalize variable, resolved #35