add flash method, refactoring of ID's and tokens