changing javascript call function