reads multiline data more correctly