Code for HypeMC