clean code base... optimization does not work