Removed loop logic