added comments
more beautification