Pion production in the MiniBooNE experiment