optimizations
merge and update