moved normalization to window