Adding function to add post