adhoc optimizations