updated to support multiple lines