adding two scattered function