add prepl command for extended formulas, fix command for extended expressions