fixes relating to change in "function" declaration