They were designed for the Scarborough to Whitby line, on which the Class O 0-4-4T locomotives then in use were having difficulty with the traffic, especially the three-mile ( 3 miles ) section of 1 in 40 (2.5%).