Added function definitions.