add --replace; various updates