Function definitions added.