Revert "optimizations"

This reverts commit c2db8e5c2101735db6df1e569714197c570c39c9.