Added relocalize function