updated Database class in current version