todo reformatting and var. renaming