Added basic search algorithm