added main-line and powerline support