refact env