added different views for different types of posts
updated sql structure