implemented endpoint to create new post