use env to register