fixed indents and added comments