some optimization changes