clean out console log and make the pagination work