optimize output for index