KiwiRail to receive government funding to upgrade electric trains