rewrite move tools, use search/replace db lib for db