Added function def and calls