changed function def --KW