JC: updated version