Reviewed code for publication