enhanced code to pass multi line test, added new test