Updated Reed's version