merge with branch 'joe' to add in pagination