add post view function