put one logic in one place
put one logic in one place