Function now takes arguments (from spreadsheet).