slight optimizations further