some optimization attempts