optimizing various elements