Refactor getList method