last working version, added rel addr handling