finished initial implementation for Search