added socket connection for palantir