added comments and updated layout