modified neighbor resource code