Fixed issue with add_neighbor function and added printfs