some strong optimizations added