added post functionality to Posts resource