fix get_ids and add testing for the method