added in check_addr_mode() function