added comments and made purgeable