change call to apply (supports multiple args passed as an array)