Use apply instead of regular function call