successfully tested normalize and a bit refactoring in tests