added new line handling