optimize resolution