refactored setupPaging method, fixed bg img issue