adds update post functionality