replacement with a more general solution