adding functions to save to db as well as show individual and all posts