this example works with both WP and gadgets executables