tried some more optimizations, not so great