Updated version of databaseAPI.java