Updated code as per JRAFT