java implementation of HEP