handle newlines. period.
towards proper error handling: pull in 'block' from outside and write a few comments