moving some code to normalize