if else in on() written

no functionality