added view for posts with database