initial version, only reading from database file