added pagination and ability to add posts - tested and works