basic line implementation