made changes to view post functionality