added comments and tabbing