fixed normalization and other things