refactoring
add searching (beta)