updated remote window code to ping remote server. Needs to be done in background however