Added function definitions