added previous post and next post methods in post model