make logic simpler