adding to macd function