added WMassCalulation function. Getting crazy errors