use ruby block for local copy