set max posts per page to 5
update some code