get rid of useless logic