refactor scp get/put