create function handle gx