location fix and added rep socket