added a first attempt at the moore search algorithm
made some minor improvements to the function, including making it a function
wrote two tests and made sure that our code worked