The EF65-500 subclass consisted of a total of 42 locomotives, including newly built locomotives and locomotives (EF65 535 - 542) modified from the earlier EF65-0 subclass (EF65 77 - 84) for use on overnight sleeping car services and express freight services operating at a maximum speed of 110 kmph .