moving stuff around, trying more optimizations