Added a linear search function