laying groundwork for database layer