removed excesive logic