I have made changes by adding two functions of multiply and add