Revert "performance optimizations"

This reverts commit 37411325715486e6b2863d8b9fb0949f22605743.
fix botched revert