Effect of combined heaving and pitching on propulsion of single and tandem flapping foils