built a post model, postindex class with delete functionality