edits to functions