refactor the getDetailList function