modified pull_outwards so as to work for Sum class. added sum_pow_expand function