Moved '.' to class constant
Used self.k instead of hardcoded 3