revised g for integration