short but significant optimizations