finish edit post function