added class Database
added depth find for database
fixed depth searh
fix main