make several file variables static
refactor one shot timer