add tangent line
fix bugs in gui