added new DB methods and some tests