changed newdatabase to method