change call function from string to function type