formatting related fixes
wireframe of the function with comments