Buses on demand could replace struggling routes