remove unused lines, improve formula.