added code to automatically randomize MAC