add functions for computing mutation matrix