modified on money for pagination issue