added method and test for mac address