support initializing from environment