beautify of optimize file, implemented indexed optimize