first working version
removed logging
dumped initial text
added ps