added local/remote selector, not written local directory stuff yet.