check_db function
Removed unused bd