modify get_id function and database collection attribute