basic reformatting and adapting for python processing