formatting

clean up format and added comments