works when specifying addresses as argument