rework from a clean base

rework from a clean base

minor updates on indentation