be smarter about setting period and buffer
some idiot added a scratch file, remove it