streamline code for rf testing