Weight transfer function created

formulas from the excel document were made into a function to reduce
processing time