added C method signature for byref method