changes as requested for issue 623
changes as requested for issue 544
little changes to not call useless normalize function