implemented first version of LineBuilder.