rf; better env detecting