nmap function updated, added mac addresses and formatting, some error checking is done