removed linear search implementation