optimizing elements