How do some locomotives function in order to be more flexible in operation