resolve #6 and resolve #7