added Environment class towards threading and futures support