Code for LineSolver Project