add simpler get function
simplify countCredit function output
refactor ProgramPaginator to make it reusable for CreditViewer