added paper edits
added code for publication