Refactoring. Using closure to spare some variables.