pushing bugfixes and optimizations