Ported to jd 2 beta