num flips added as param