refactoring, doc
linear search