created purge_tables decorator feature and fixed bug