use function to set result
fixed wrong import