Adding helper method for getting segments with id