cleaned demo, moved methods to database_queries