working version with 14-bus case