Removed ugly for-next loop