Functionality working for drawing lines