aded some hwi code