working line editing
added some test code