Added functionality to create new posts