add remote directory functionality