refactoring and playing against self.