Did some optimization