fixed typo in sql function add