added comments and toggle setting

added comments and toggle setting