Removed excessive logic