Studying the effect of the tail on the dynamics of a flapping-wing MAV