implemented edit posts using JSON