Heavily modified version of HaMStR (Ebersberger et al., 2009)