add reduce method to list, clean code