change switch case to if else
rename defined value
realign
functionize get next file event