adds weighted_moving_average method