Removed extra loop