Adding functions with three input arrays only.