removed port element eon struct env, modified function accordingly. code need to be debugged though