success in extracting function!!
rename var
indent
comment out debugging printf
refactor
added commit compare test