replace 'function = () ->' to 'function: () ->'. and add load_database for sp_score