adding bindEnvironment to handle post event