added missing import of Sum in models_functions file, must have mistakenly deleted it recently trying to clean up unused import statements