add tests and necessary db_index