reformat code in customer loop
update folder path loop
add some phpdoc