removed some bottlenecks