Use partial instead of loop for index